<!-- 人事-基础设置-转正提醒设置 -->
<template>
  <pageHeaderNew :title="title" :breadCrumb="breadCrumb" showBack>
    <template #buts>
      <a-space>
        <a-button @click="cancel">取消</a-button>
        <a-button type="primary" @click="save">保存</a-button>
      </a-space>
    </template>
  </pageHeaderNew>
  <div class="wrap">
    <div class="reminding">
      <a-space>
        <icon-exclamation-circle
          :size="20"
          :style="{
            color: 'red'
          }"
        />
        <span
          >试用期考核通过，系统自动或HR手动发送转正申请提醒通知至员工、员工上级以及员工所在部门负责人。</span
        >
      </a-space>
    </div>
    <a-form :model="list">
      <a-form-item class="send" field="" label="邮件发送方式：">
        <a-radio-group :defaultValue="1" v-model="list.emailWay">
          <a-radio :value="1">系统自动发送</a-radio>
          <a-radio :value="2">HR手动发送</a-radio>
        </a-radio-group>
      </a-form-item>
      <a-form-item field="" label="提醒条件：">
        在员工试用期考核通过后，触发以下提醒配置
      </a-form-item>
      <a-form-item field="" label="提醒时间：">
        在员工试用期考核通过后
        <a-input-number
          v-model="list.remindTime"
          :style="{
            width: '50px',
            margin: '0 5px'
          }"
          hideButton
          :min="1"
        ></a-input-number>
        分钟提醒
      </a-form-item>
      <a-form-item field="" label="提醒方式：">
        <a-checkbox-group v-model="list.remindWay">
          <a-checkbox :value="1">短信提醒</a-checkbox>
          <a-checkbox :value="2">系统信息提醒</a-checkbox>
          <a-checkbox :value="3">邮件提醒</a-checkbox>
        </a-checkbox-group>
      </a-form-item>

      <a-form-item field="" label="提醒内容：">
        <a-textarea
          placeholder="请输入内容"
          :maxLength="300"
          :autoSize="{
            minRows: 10
          }"
          :style="{
            width: '500px'
          }"
          allowClear
          showWordLimit
        ></a-textarea>
      </a-form-item>
    </a-form>

    <div class="content"></div>
  </div>
</template>

<script lang="ts" setup>
const router = useRouter();
const title = '转正提醒设置';

const breadCrumb: string[] = [
  '人事',
  '基础设置',
  '信息提醒与预警设置',
  '转正提醒设置'
];

let list = ref({
  emailWay: 1,
  remindTime: undefined,
  remindWay: [],
  remark: ''
}); // 储存标签数据

// 获取数据
const getData = async () => {
  try {
    console.log(1);
  } catch (error: unknown) {
    console.log(error);
  }
};
getData();

// 保存
const save = async () => {
  try {
    console.log(1);
  } catch (error: unknown) {
    console.log(error);
  }
};

// 取消
const cancel = () => {
  router.back();
};
</script>

<style scoped lang="less">
.wrap {
  padding: 10px 20px;

  .reminding {
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
  }

  .send {
    margin-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ccc;
  }
}
</style>
